<template>
    <label class="h50 white-bg px12 f16 m-group-item" flex>
        <span v-if="required" class="c1">*</span>
        <span class="label" :style="{width: this.labelWidth_}"><slot>{{label}}</slot></span>
        <input v-model="input" flex-box="1" class="bd-no f16 fitw" :placeholder="placeholder">
        <slot name="right"></slot>
    </label>
</template>
<script>
  export default {
    props: {
      label: null,
      value: null,
      required: {
        default: false
      },
      placeholder: {
        default: '请输入内容'
      }
    },
    data () {
      const {$data} = this.$parent
      return {
        ...$data
      }
    },
    computed: {
      input: {
        get () {
          return this.value
        },
        set (v) {
          this.$emit('input', v)
        }
      }
    },
    methods: {},
    components: {}
  }
</script>
<style type="text/scss" lang="scss" scoped>

</style>
